package com.atwisdom.star.log.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName sys_log
 */
@TableName(value ="sys_log")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysLog implements Serializable {
    /**
     * 
     */
    @TableId
    private String id;

    /**
     * 
     */
    private String method;

    /**
     * 
     */
    private String msg;

    /**
     * 请求IP
     */
    @TableField("request_ip")
    private String requestIP;

    /**
     * 
     */
    private Date timestamp;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public SysLog(String method, String msg) {
        this.method = method;
        this.msg = msg;
    }
    public SysLog(String method, String msg, String requestIP) {
        this.method = method;
        this.msg = msg;
        this.requestIP = requestIP;
    }
}